<div class="wrap">

<h2>List Photos </h2>

	<div id="ajaxResponse" class="ajaxResponse"></div>
	<table class="widefat">
		<thead>
		<tr>
			<th scope="col" style="text-align: center">{TranslateTag}B_LABEL_ID{/TranslateTag}</th>
			<th scope="col">Photo</th>
	        <th scope="col">{TranslateTag}B_LABEL_NAME{/TranslateTag}</th>
            <th scope="col">{TranslateTag}B_LABEL_DESCRIPTION{/TranslateTag}</th>
	        <th colspan="3" style="text-align: center">{TranslateTag}B_LABEL_ACTION{/TranslateTag}</th>
		</tr>
		</thead>
		<tbody id="row-photo">
			{foreach name=cat from=$PHOTOS.list item=item}
				<tr id="row-{$item->id}" class="{cycle values=,alternate}">
					<th scope='row' style='text-align: center' valign="middle">{$item->id}</th>
					<td valign="middle">
                    	<img src="../{$PHOTOS.path_thumb}{$item->path}" />
                    </td>
					<td valign="middle">
                    	   {$item->name}
                    </td>
                    <td valign="middle">
                     	{$item->description}
                    </td>
					<td><a href="?module=BgcmsGallery&sub1=gallery&act=editphotos&galleryid={$smarty.get.galleryid}&id={$item->id}" class='edit'>Edit</a></td>
					<td><a onclick="onDeletePhotos('?{$smarty.server.QUERY_STRING}', '{$item->id}','ajaxResponse')" class='delete'>Delete</a></td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	{if $PHOTOS.list != NULL}
    <div>			
              <div style="width:300px; float:left"> 
                  {TranslateTag}LABEL_PAGES{/TranslateTag} : {$PHOTOS.TOTAL} {TranslateTag}LABEL_OF{/TranslateTag} {$PHOTOS.TOTALDATA}
              </div>			
              <div style="width:300px; text-align:right; float:right" >{$PHOTOS.FIRST} {$PHOTOS.PRE}&nbsp;{$PHOTOS.LISTPAGE} {TranslateTag}LABEL_OF{/TranslateTag} &nbsp; {$PHOTOS.TOTALPAGE} &nbsp;                   
                  <select onchange="javascript:window.location='{$PHOTOS.LINK}&{$PHOTOS.PATHNAME}='+this.value">
                    {$PHOTOS.COMBOPAGE}                     
                  </select>&nbsp;{$PHOTOS.NEXT} {$PHOTOS.LAST}         
              </div>
              <div style="clear:both"></div>		
    </div>	     
    {/if}
</div>

